#include <stdio.h>
#include <stdlib.h>
#include <pwd.h>
#include <sys/utsname.h>
#include <unistd.h>
#include <stddef.h>
#include <string.h>

int main(int argc, char** argv)
{
	struct utsname os;
	char hostname[1024];
	struct passwd *pw;
	gethostname(hostname, 1024);
	uname(&os);
	printf("sysname: %s\n", os.sysname);
	printf("nodename: %s\n", os.release);
	printf("version: %s\n", os.version);
	printf("machine: %s\n", os.machine);
	printf("hostname: %s\n", hostname);
	pw = getpwnam("richard_n");
	printf("user_name: %s\n", pw->pw_name);
	printf("pw_uid: %u\n",pw->pw_uid);
	printf("pw_gid: %u\n",pw->pw_gid);
	printf("pw_dir: %s\n",pw->pw_dir);
	printf("pw_shell: %s\n",pw->pw_shell);

	exit(0);
}
